/*
 * @Description: 
 * @Version: 2.0
 * @Date: 2024-04-09 12:49:01
 * @LastEditTime: 2024-04-09 12:58:13
 */
import { userDataType } from '@/api/model'
import { defineStore } from 'pinia'

// 存储当前位置
export const useUserStore = defineStore('userData', {
    state: () => {
        return {
            // username: 0,
            // nickname:"",
            // address: "",
            // avatar:""
            userData:{}
        }
    },
    actions: {
        saveCurrentLocation(userData: userDataType) {
            this.userData = userData
        }
    },
    getters: {
        userData:(state)=>state.userData
    },
    
})

